<?php

/**
 * ExtContextMenuBase class file
 *
 * @author TrueSoftware B.V. (The Netherlands)
 * @link http://www.ext4yii.com
 * @copyright Copyright 2007-2010 TrueSoftwareB.V. all rights reserved.
 * @license http://www.ext4yii.com/license/
 *          EVALUATION VERSION - NOT FOR COMMERCIAL USE OR DISTRIBUTION.
 * @version 0.7.2
 */
class ExtContextMenuBase extends ExtMenu
{

    //override
    protected function configureClientIDs($registerID = true, $makeGlobal = true)
    {
        parent::configureClientIDs(true, is_null($this->parent));
    }

    public function renderConfig($asobject = true)
    {
        $this->setConfig('floating', true);

        return array(
            'id' => $this->getAssignedID(),
            'config' => parent::renderConfig($asobject));
    }

    private function getAssignedID()
    {
        $id = $this->getId();
        if ($id != "" && stristr('!+' . $id, '!+x4y') === false)
            return $id;
        else
            return null;
    }

}

?>
